<?php

namespace app\base\model;

use app\common\model\CommonModel;



class CouponModel extends CommonModel{

    protected  $name = 'base_coupon';

    protected  $pk   = 'coupon_id';



    public function getValidityTimeAttr($value,$data)

    {

        return [$data['valid_bg_time'],$data['valid_end_time']];

    }



    public function getReleaseTimeAttr($value,$data)

    {

        return [$data['start_time'],$data['end_time']];

    }

}